package com.neuq.animaladoption.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.time.LocalDateTime;

@Data
public class Shelter {
    @NotNull(groups = Update.class)
    private Integer id;//主键ID
    @NotEmpty
    private String shelterName;//收容所名称
    @NotEmpty
    private String cityAddress;//所容所所在市
    @NotEmpty
    private String shelterAddress;//收容所具体地址
    private Integer createUser;//创建人ID
    private Integer countCat;//收容所流浪猫的数量
    private Integer countDog;//收容所流浪犬的数量
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;//更新时间

    public interface Add extends Default {}

    public interface Update extends Default {}
}
